package com.mvd.app.activity;

import android.os.Bundle;

import com.bumptech.glide.Glide;
import com.mvd.app.R;
import com.mvd.app.application.BaseApplication;
import com.mvd.app.commons.PDALogUtils;

import butterknife.BindView;
import butterknife.ButterKnife;

//外检拍照照片预览
public class PhotoPreviewActivity extends BaseActivity {

    @BindView(R.id.ac_photo_preview_iv)
    com.github.chrisbanes.photoview.PhotoView acPhotoPreviewIv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_photo_preview);
        ButterKnife.bind(this);
        //        int key_photo = getIntent().getExtras().getInt("key_integer", 1);
//        Glide.with(PhotoPreviewActivity.this).load(BaseApplication.WAIJIAN_PHOTO_PREVIEW_LISTS.get(key_photo)).
//                into(acPhotoPreviewIv);
        String key_photo = getIntent().getExtras().getString("key_integer", "");
        String key = getIntent().getExtras().getString("key");
        String logStr = "PhotoPreviewActivity-----PHOTO_TYPE===" + key_photo + "------mode===" + key;
        PDALogUtils.createLogFile(BaseApplication.JIANCE_MODE, logStr.getBytes());
        if (key_photo != "" && key != null) {
            if (key.equals("waijian")) {
                Glide.with(PhotoPreviewActivity.this).load(
                        BaseApplication.WAIJIAN_PHOTO_PREVIEW_LISTS.get(key_photo)).
                        into(acPhotoPreviewIv);
            } else if (key.equals("huanbao")) {
                Glide.with(PhotoPreviewActivity.this).load(
                        BaseApplication.HUANBAO_PHOTO_PREVIEW_LISTS.get(key_photo)).
                        into(acPhotoPreviewIv);
            }
        }
    }
}
